<include file="../header" />
<body class="J_scroll_fixed">

<form class="well form-search" method="post" style="float:left;width:100%;" action="{:U('solarPanel/viewLog')}">
    <input type="hidden" name='id' value='{$panelId}' />
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            <input type="hidden" name="id" value="{$id}" />
                    日期选择：
                    <input type="text" name="day" class="input length_2 J_date" value="{$day}" autocomplete="off">
            <button class="btn btn-primary">搜索</button>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <div id="mainCharts" style="height: 360px;margin-top: 30px;"></div>
    <script type="text/javascript">
        $(function () {
           var myCharts = echarts.init(document.getElementById('mainCharts'));
           option = {
            tooltip : {
                trigger: 'axis'
            },
            legend: {
                data:['电压','电流','温度','湿度']
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            toolbox: {
                feature: {
                    saveAsImage: {}
                }
            },
            xAxis : [
                {
                    type : 'category',
                    boundaryGap : false,
                    data : []
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    name:'电压',
                    type:'line',
                    stack: '总量',
                    data:[<foreach name="voltage" item="vo">{$vo},</foreach>]
                },
                {
                    name:'电流',
                    type:'line',
                    stack: '总量',
                    data:[<foreach name="current" item="vo">{$vo},</foreach>]
                },
                {
                    name:'温度',
                    type:'line',
                    stack: '总量',
                    data:[<foreach name="temperature" item="vo">{$vo},</foreach>]
                },
                {
                    name:'湿度',
                            type:'line',
                        stack: '总量',
                        data:[<foreach name="humidity" item="vo">{$vo},</foreach>]
                }
            ]
        };
        myCharts.setOption(option);
        });
    </script>
    

</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>